<template>
  <page-layout :noToolbar="true">

    <el-card class="box-card">
      <div class="card-header">区域注册统计</div>
          <el-card class="box-card">
            <el-table
              :data="areaRegisterRate" border stripe
              v-loading="loading"
              element-loading-text="拼命统计中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.8)">
              <el-table-column
                prop="areaCode"
                label="区域代码"
                width="100">
              </el-table-column>
              <el-table-column prop="areaName" label="区域名称">
              </el-table-column>
              <el-table-column prop="departNewNum" label="今日新增企业数" >
              </el-table-column>
              <el-table-column prop="departTotalNum" label="企业总数" >
              </el-table-column>
              <el-table-column prop="userNewNum" label="今日新增用户数" >
              </el-table-column>
              <el-table-column prop="userTotalNum" label="用户总数" >
              </el-table-column>
            </el-table>
          </el-card>
    </el-card>
  </page-layout>
</template>
<script>
import PageLayout from "@/components/page-layout";
import { mapGetters } from "vuex";
import Status from "@/libs/status";
import Moment from "moment";
export default {
  beforeRouteEnter(to, from, next) {
    next(vm => {
      vm.refresh();
    });
  },
  created() {},
  mounted() {},
  data() {
    return {
      loading: false
    };
  },
  computed: {
    ...mapGetters({
      areaRegisterRate: "areaRegisterRate"
    })
  },
  methods: {
    getPageChange(val) {
      this.$store.dispatch("registerStatisticAreaS").then(ret => {
        this.loading = false;
      });
    },
    refresh() {
      this.getPageChange(1);
    }
  },
  components: {
    PageLayout
  }
};
</script>
<style scoped>
</style>
